import json
import os

from config import base_path

def read_data1():
    with open(base_path+os.sep+"data"+os.sep+"login_data.json","r",encoding="utf-8") as ff:
        data=json.load(ff)
        list1=[]
        for aa in data[0:1:1]:
            a=aa["user"]
            b=aa["pwd"]
            c=aa["code"]
            d=aa["ex"]
            list1.append((a,b,c,d))
    return list1


def read_data2():
    with open(base_path+os.sep+"data"+os.sep+"login_data.json", "r", encoding="utf-8") as ff:
        data = json.load(ff)
        list1= []
        for aa in data[1::1]:
            a = aa["user"]
            b = aa["pwd"]
            c = aa["code"]
            d = aa["ex"]
            list1.append((a, b, c, d))
    return list1
